// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.Nodes;

public partial class NodesNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>
	/// Initializes a new instance of the <see cref="NodesNamespacedClient"/> class for mocking.
	/// </para>
	/// </summary>
	protected NodesNamespacedClient() : base()
	{
	}

	internal NodesNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(ClearRepositoriesMeteringArchiveRequest request)
	{
		request.BeforeRequest();
		return DoRequest<ClearRepositoriesMeteringArchiveRequest, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearRepositoriesMeteringArchiveResponse> ClearRepositoriesMeteringArchiveAsync(ClearRepositoriesMeteringArchiveRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ClearRepositoriesMeteringArchiveRequest, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(ClearRepositoriesMeteringArchiveRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion)
	{
		var descriptor = new ClearRepositoriesMeteringArchiveRequestDescriptor(nodeId, maxArchiveVersion);
		descriptor.BeforeRequest();
		return DoRequest<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, Action<ClearRepositoriesMeteringArchiveRequestDescriptor> configureRequest)
	{
		var descriptor = new ClearRepositoriesMeteringArchiveRequestDescriptor(nodeId, maxArchiveVersion);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearRepositoriesMeteringArchiveResponse> ClearRepositoriesMeteringArchiveAsync(ClearRepositoriesMeteringArchiveRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearRepositoriesMeteringArchiveResponse> ClearRepositoriesMeteringArchiveAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearRepositoriesMeteringArchiveRequestDescriptor(nodeId, maxArchiveVersion);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use this API to clear the archived repositories metering information in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearRepositoriesMeteringArchiveResponse> ClearRepositoriesMeteringArchiveAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, Action<ClearRepositoriesMeteringArchiveRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearRepositoriesMeteringArchiveRequestDescriptor(nodeId, maxArchiveVersion);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearRepositoriesMeteringArchiveRequestDescriptor, ClearRepositoriesMeteringArchiveResponse, ClearRepositoriesMeteringArchiveRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(GetRepositoriesMeteringInfoRequest request)
	{
		request.BeforeRequest();
		return DoRequest<GetRepositoriesMeteringInfoRequest, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRepositoriesMeteringInfoResponse> GetRepositoriesMeteringInfoAsync(GetRepositoriesMeteringInfoRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetRepositoriesMeteringInfoRequest, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(GetRepositoriesMeteringInfoRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(Elastic.Clients.Elasticsearch.NodeIds nodeId)
	{
		var descriptor = new GetRepositoriesMeteringInfoRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequest<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(Elastic.Clients.Elasticsearch.NodeIds nodeId, Action<GetRepositoriesMeteringInfoRequestDescriptor> configureRequest)
	{
		var descriptor = new GetRepositoriesMeteringInfoRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRepositoriesMeteringInfoResponse> GetRepositoriesMeteringInfoAsync(GetRepositoriesMeteringInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRepositoriesMeteringInfoResponse> GetRepositoriesMeteringInfoAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRepositoriesMeteringInfoRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
	/// This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
	/// information needed to compute aggregations over a period of time. Additionally, the information exposed by this
	/// API is volatile, meaning that it won’t be present after node restarts.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRepositoriesMeteringInfoResponse> GetRepositoriesMeteringInfoAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, Action<GetRepositoriesMeteringInfoRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRepositoriesMeteringInfoRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRepositoriesMeteringInfoRequestDescriptor, GetRepositoriesMeteringInfoResponse, GetRepositoriesMeteringInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads(HotThreadsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<HotThreadsRequest, HotThreadsResponse, HotThreadsRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(HotThreadsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<HotThreadsRequest, HotThreadsResponse, HotThreadsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads(HotThreadsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads(Elastic.Clients.Elasticsearch.NodeIds? nodeId)
	{
		var descriptor = new HotThreadsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequest<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<HotThreadsRequestDescriptor> configureRequest)
	{
		var descriptor = new HotThreadsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads()
	{
		var descriptor = new HotThreadsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual HotThreadsResponse HotThreads(Action<HotThreadsRequestDescriptor> configureRequest)
	{
		var descriptor = new HotThreadsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(HotThreadsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, CancellationToken cancellationToken = default)
	{
		var descriptor = new HotThreadsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequestAsync<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<HotThreadsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new HotThreadsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new HotThreadsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// This API yields a breakdown of the hot threads on each selected node in the cluster.
	/// The output is plain text with a breakdown of each node’s top hot threads.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-hot-threads.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<HotThreadsResponse> HotThreadsAsync(Action<HotThreadsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new HotThreadsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<HotThreadsRequestDescriptor, HotThreadsResponse, HotThreadsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info(NodesInfoRequest request)
	{
		request.BeforeRequest();
		return DoRequest<NodesInfoRequest, NodesInfoResponse, NodesInfoRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(NodesInfoRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<NodesInfoRequest, NodesInfoResponse, NodesInfoRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info(NodesInfoRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric)
	{
		var descriptor = new NodesInfoRequestDescriptor(nodeId, metric);
		descriptor.BeforeRequest();
		return DoRequest<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Action<NodesInfoRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesInfoRequestDescriptor(nodeId, metric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info()
	{
		var descriptor = new NodesInfoRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesInfoResponse Info(Action<NodesInfoRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesInfoRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(NodesInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesInfoRequestDescriptor(nodeId, metric);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Action<NodesInfoRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesInfoRequestDescriptor(nodeId, metric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesInfoRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes information.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesInfoResponse> InfoAsync(Action<NodesInfoRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesInfoRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesInfoRequestDescriptor, NodesInfoResponse, NodesInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings(ReloadSecureSettingsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequest, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(ReloadSecureSettingsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequest, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings(ReloadSecureSettingsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings(Elastic.Clients.Elasticsearch.NodeIds? nodeId)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<ReloadSecureSettingsRequestDescriptor> configureRequest)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings()
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ReloadSecureSettingsResponse ReloadSecureSettings(Action<ReloadSecureSettingsRequestDescriptor> configureRequest)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(ReloadSecureSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, CancellationToken cancellationToken = default)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<ReloadSecureSettingsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reloads the keystore on nodes in the cluster.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ReloadSecureSettingsResponse> ReloadSecureSettingsAsync(Action<ReloadSecureSettingsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ReloadSecureSettingsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ReloadSecureSettingsRequestDescriptor, ReloadSecureSettingsResponse, ReloadSecureSettingsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats(NodesStatsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<NodesStatsRequest, NodesStatsResponse, NodesStatsRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(NodesStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<NodesStatsRequest, NodesStatsResponse, NodesStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats<TDocument>(NodesStatsRequestDescriptor<TDocument> descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats<TDocument>(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>(nodeId, metric, indexMetric);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats<TDocument>(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, Action<NodesStatsRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>(nodeId, metric, indexMetric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats<TDocument>()
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats<TDocument>(Action<NodesStatsRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats(NodesStatsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric)
	{
		var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, Action<NodesStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats()
	{
		var descriptor = new NodesStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesStatsResponse Stats(Action<NodesStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync<TDocument>(NodesStatsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync<TDocument>(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>(nodeId, metric, indexMetric);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync<TDocument>(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, Action<NodesStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>(nodeId, metric, indexMetric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync<TDocument>(Action<NodesStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor<TDocument>, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(NodesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Elastic.Clients.Elasticsearch.Metrics? indexMetric, Action<NodesStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns cluster nodes statistics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesStatsResponse> StatsAsync(Action<NodesStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesStatsRequestDescriptor, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage(NodesUsageRequest request)
	{
		request.BeforeRequest();
		return DoRequest<NodesUsageRequest, NodesUsageResponse, NodesUsageRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(NodesUsageRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<NodesUsageRequest, NodesUsageResponse, NodesUsageRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage(NodesUsageRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric)
	{
		var descriptor = new NodesUsageRequestDescriptor(nodeId, metric);
		descriptor.BeforeRequest();
		return DoRequest<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Action<NodesUsageRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesUsageRequestDescriptor(nodeId, metric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage()
	{
		var descriptor = new NodesUsageRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual NodesUsageResponse Usage(Action<NodesUsageRequestDescriptor> configureRequest)
	{
		var descriptor = new NodesUsageRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(NodesUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesUsageRequestDescriptor(nodeId, metric);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Metrics? metric, Action<NodesUsageRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesUsageRequestDescriptor(nodeId, metric);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesUsageRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Returns information on the usage of features.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cluster-nodes-usage.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<NodesUsageResponse> UsageAsync(Action<NodesUsageRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new NodesUsageRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<NodesUsageRequestDescriptor, NodesUsageResponse, NodesUsageRequestParameters>(descriptor, cancellationToken);
	}
}